from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools import float_is_zero


class ChangeProductionQty(models.TransientModel):
    _inherit = 'change.production.qty'

    def change_prod_qty(self):
        if not self.env.user.has_group('base.group_system'):
            raise UserError(_('You do not have operational permissions'))

        return super().change_prod_qty()
